﻿@model List<Category>

<selection>
    <div class="card">
        <div class="card-header">All Categories</div>
        <div class="list-group list-group-flush">

            @if (Model.Count == 0)
            {
                <a class="list-group-item list-group-item-action">
                    <div>There are no categories.</div>
                </a>
            }
            else
            {
                foreach (var category in Model)
                {
                    <a class="list-group-item list-group-item-action" asp-controller="Blog" asp-action="Categories" asp-route-id="@category.CategoriesName">
                        @category.CategoriesName
                    </a>
                }
            }

        </div>
    </div>
</selection>